#pragma once

#include "RouteUpdate.h"
#include "HeaderSpace.h"

#include <folly/MPMCPipeline.h>
#include <string>
#include <tbb/concurrent_vector.h>

namespace nexus {

struct Overwrite {
  HeaderSpace hs;
  std::string from;
  std::string to;
};

struct AtomicOverwrite {
  Network* network;
  Device* device;
  tbb::concurrent_vector<std::pair<HeaderSpace, Port*>> overwrites;
  // std::vector<Overwrite> overwrites;
};

using Pipeline = folly::MPMCPipeline<
    std::shared_ptr<RouteUpdate>,
    std::shared_ptr<RouteUpdate>,
    std::shared_ptr<AtomicOverwrite>,
    std::shared_ptr<AtomicOverwrite>>;

} // namespace nexus